package pnlSwitch;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import pnlMain.PnlWelkom;
import frame.FrameResBeheer;

public class PnlSystemController implements ActionListener {

	private FrameResBeheer frameResBeheer;
	private PnlWelkom pnlWelkom;

	public PnlSystemController(FrameResBeheer frameResBeheer) {
		this.frameResBeheer = frameResBeheer;
	}

	public PnlSystemController(PnlWelkom pnlWelkom) {
		this.pnlWelkom = pnlWelkom;
	}

	public void actionPerformed(ActionEvent e) {
			System.out.println(pnlWelkom);
		if (e.getActionCommand().equals("exit")) {
			System.exit(0);
		}
		if (e.getActionCommand().equals("main")) {
			frameResBeheer.dispose();
		}
		
	}

}
